import os

# xpath：
# //ul[starts-with(@class,'clearfix')]/li/@data-aid

s = '''
BV1wS4y1N7ze
BV1WR4y177y7
BV1i44y1J75f
BV1Xg411N76R
BV1TP4y1j7Ni
BV1Sf4y1g7XU
BV1G54y177zb
BV1Vb4y1C7eh
BV1nb4y1o7Xq
BV1Hv41187cY
BV1ZK411c7ot
BV1ny4y187fa
BV1aA411u7vN
BV16V411q7yg
BV1dA411H7tk
BV1Li4y1c7Aw
BV145411p78D
BV1kt4y167eu
BV1EK4y1L7gB
BV1zk4y1C7Dj
BV1sV41127Kj
BV1K54y127h9
BV1f54y1C7Ga
BV1vC4y1t7id
BV1XA411J7J7
BV1Ph411o7Vh
BV1Ha4y177Dg
BV18Z4y1K7nh
BV1sv411i7Ro
BV1LK411M7xG
'''

ls = s.split('\n')
mls = map(lambda x: x.strip(), ls)

# 下载路径
os.chdir(r'D:\Video\0资料\SolidEdge 168')

for l in mls:
	if len(l) == 0:
		continue
	link = f'https://www.bilibili.com/video/{l}'
	# 不下载弹幕，清晰度480p
	cmd = f'you-get --no-caption -F dash-flv480 {link}'
	os.system(cmd)

os.system('pause')